/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package ar.edu.utn.frsf.cidisi.upcolbpip.b2bcollaborations.impl;

import ar.edu.utn.frsf.cidisi.upcolbpip.b2bcollaborations.B2bcollaborationsPackage;
import ar.edu.utn.frsf.cidisi.upcolbpip.b2bcollaborations.QuantitativeGoal;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Quantitative Goal</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link ar.edu.utn.frsf.cidisi.upcolbpip.b2bcollaborations.impl.QuantitativeGoalImpl#getCurrentValue <em>Current Value</em>}</li>
 *   <li>{@link ar.edu.utn.frsf.cidisi.upcolbpip.b2bcollaborations.impl.QuantitativeGoalImpl#getTargetValue <em>Target Value</em>}</li>
 *   <li>{@link ar.edu.utn.frsf.cidisi.upcolbpip.b2bcollaborations.impl.QuantitativeGoalImpl#getUnitOfMeasurement <em>Unit Of Measurement</em>}</li>
 *   <li>{@link ar.edu.utn.frsf.cidisi.upcolbpip.b2bcollaborations.impl.QuantitativeGoalImpl#getComputationMethod <em>Computation Method</em>}</li>
 *   <li>{@link ar.edu.utn.frsf.cidisi.upcolbpip.b2bcollaborations.impl.QuantitativeGoalImpl#getUpdateFrecuency <em>Update Frecuency</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class QuantitativeGoalImpl extends BusinessGoalImpl implements QuantitativeGoal {
	/**
	 * The default value of the '{@link #getCurrentValue() <em>Current Value</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCurrentValue()
	 * @generated
	 * @ordered
	 */
	protected static final String CURRENT_VALUE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getCurrentValue() <em>Current Value</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCurrentValue()
	 * @generated
	 * @ordered
	 */
	protected String currentValue = CURRENT_VALUE_EDEFAULT;

	/**
	 * The default value of the '{@link #getTargetValue() <em>Target Value</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTargetValue()
	 * @generated
	 * @ordered
	 */
	protected static final String TARGET_VALUE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getTargetValue() <em>Target Value</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTargetValue()
	 * @generated
	 * @ordered
	 */
	protected String targetValue = TARGET_VALUE_EDEFAULT;

	/**
	 * The default value of the '{@link #getUnitOfMeasurement() <em>Unit Of Measurement</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getUnitOfMeasurement()
	 * @generated
	 * @ordered
	 */
	protected static final String UNIT_OF_MEASUREMENT_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getUnitOfMeasurement() <em>Unit Of Measurement</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getUnitOfMeasurement()
	 * @generated
	 * @ordered
	 */
	protected String unitOfMeasurement = UNIT_OF_MEASUREMENT_EDEFAULT;

	/**
	 * The default value of the '{@link #getComputationMethod() <em>Computation Method</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getComputationMethod()
	 * @generated
	 * @ordered
	 */
	protected static final String COMPUTATION_METHOD_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getComputationMethod() <em>Computation Method</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getComputationMethod()
	 * @generated
	 * @ordered
	 */
	protected String computationMethod = COMPUTATION_METHOD_EDEFAULT;

	/**
	 * The default value of the '{@link #getUpdateFrecuency() <em>Update Frecuency</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getUpdateFrecuency()
	 * @generated
	 * @ordered
	 */
	protected static final String UPDATE_FRECUENCY_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getUpdateFrecuency() <em>Update Frecuency</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getUpdateFrecuency()
	 * @generated
	 * @ordered
	 */
	protected String updateFrecuency = UPDATE_FRECUENCY_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected QuantitativeGoalImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return B2bcollaborationsPackage.Literals.QUANTITATIVE_GOAL;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getCurrentValue() {
		return currentValue;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCurrentValue(String newCurrentValue) {
		String oldCurrentValue = currentValue;
		currentValue = newCurrentValue;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, B2bcollaborationsPackage.QUANTITATIVE_GOAL__CURRENT_VALUE, oldCurrentValue, currentValue));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getTargetValue() {
		return targetValue;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTargetValue(String newTargetValue) {
		String oldTargetValue = targetValue;
		targetValue = newTargetValue;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, B2bcollaborationsPackage.QUANTITATIVE_GOAL__TARGET_VALUE, oldTargetValue, targetValue));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getUnitOfMeasurement() {
		return unitOfMeasurement;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setUnitOfMeasurement(String newUnitOfMeasurement) {
		String oldUnitOfMeasurement = unitOfMeasurement;
		unitOfMeasurement = newUnitOfMeasurement;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, B2bcollaborationsPackage.QUANTITATIVE_GOAL__UNIT_OF_MEASUREMENT, oldUnitOfMeasurement, unitOfMeasurement));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getComputationMethod() {
		return computationMethod;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setComputationMethod(String newComputationMethod) {
		String oldComputationMethod = computationMethod;
		computationMethod = newComputationMethod;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, B2bcollaborationsPackage.QUANTITATIVE_GOAL__COMPUTATION_METHOD, oldComputationMethod, computationMethod));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getUpdateFrecuency() {
		return updateFrecuency;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setUpdateFrecuency(String newUpdateFrecuency) {
		String oldUpdateFrecuency = updateFrecuency;
		updateFrecuency = newUpdateFrecuency;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, B2bcollaborationsPackage.QUANTITATIVE_GOAL__UPDATE_FRECUENCY, oldUpdateFrecuency, updateFrecuency));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__CURRENT_VALUE:
				return getCurrentValue();
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__TARGET_VALUE:
				return getTargetValue();
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__UNIT_OF_MEASUREMENT:
				return getUnitOfMeasurement();
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__COMPUTATION_METHOD:
				return getComputationMethod();
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__UPDATE_FRECUENCY:
				return getUpdateFrecuency();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__CURRENT_VALUE:
				setCurrentValue((String)newValue);
				return;
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__TARGET_VALUE:
				setTargetValue((String)newValue);
				return;
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__UNIT_OF_MEASUREMENT:
				setUnitOfMeasurement((String)newValue);
				return;
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__COMPUTATION_METHOD:
				setComputationMethod((String)newValue);
				return;
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__UPDATE_FRECUENCY:
				setUpdateFrecuency((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__CURRENT_VALUE:
				setCurrentValue(CURRENT_VALUE_EDEFAULT);
				return;
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__TARGET_VALUE:
				setTargetValue(TARGET_VALUE_EDEFAULT);
				return;
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__UNIT_OF_MEASUREMENT:
				setUnitOfMeasurement(UNIT_OF_MEASUREMENT_EDEFAULT);
				return;
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__COMPUTATION_METHOD:
				setComputationMethod(COMPUTATION_METHOD_EDEFAULT);
				return;
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__UPDATE_FRECUENCY:
				setUpdateFrecuency(UPDATE_FRECUENCY_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__CURRENT_VALUE:
				return CURRENT_VALUE_EDEFAULT == null ? currentValue != null : !CURRENT_VALUE_EDEFAULT.equals(currentValue);
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__TARGET_VALUE:
				return TARGET_VALUE_EDEFAULT == null ? targetValue != null : !TARGET_VALUE_EDEFAULT.equals(targetValue);
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__UNIT_OF_MEASUREMENT:
				return UNIT_OF_MEASUREMENT_EDEFAULT == null ? unitOfMeasurement != null : !UNIT_OF_MEASUREMENT_EDEFAULT.equals(unitOfMeasurement);
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__COMPUTATION_METHOD:
				return COMPUTATION_METHOD_EDEFAULT == null ? computationMethod != null : !COMPUTATION_METHOD_EDEFAULT.equals(computationMethod);
			case B2bcollaborationsPackage.QUANTITATIVE_GOAL__UPDATE_FRECUENCY:
				return UPDATE_FRECUENCY_EDEFAULT == null ? updateFrecuency != null : !UPDATE_FRECUENCY_EDEFAULT.equals(updateFrecuency);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (currentValue: ");
		result.append(currentValue);
		result.append(", targetValue: ");
		result.append(targetValue);
		result.append(", unitOfMeasurement: ");
		result.append(unitOfMeasurement);
		result.append(", computationMethod: ");
		result.append(computationMethod);
		result.append(", updateFrecuency: ");
		result.append(updateFrecuency);
		result.append(')');
		return result.toString();
	}

} //QuantitativeGoalImpl
